<template>
  <div>
    <a-row>
      <a-col :span="6">字段标题: </a-col>
      <a-col :span="18">
        <a-input v-model="config.label"/>
      </a-col>
    </a-row>
    <a-row>
      <a-col :span="6">字段名称: </a-col>
      <a-col :span="18">
        <a-input v-model="config.fieldName"/>
      </a-col>
    </a-row>
  </div>
</template>
<script>
import {createProps, randomUUID} from "@/utils";
import {createField} from "@/components/form/type";
let index = 1

function creatField() {
  let res = createField();
  res.id = randomUUID();
  res.comp = 'input';
  res.configs = '{}';
  res.label = '文本' + index++
  return res;
}

export default {
  name: 'InputConfig',
  creatField,
  props: {
    config: createProps(Object, creatField),
  },
};
</script>